package com.example.base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.example.base.entity.LoginEntity

@Dao
interface UserDao {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(loginEntity: LoginEntity):Long
    @Delete
    fun delete(loginEntity: LoginEntity):Int

    @Query("select * from user where id = :uid")
    fun getUserById(uid:Int):LoginEntity

}